Trajectory processing apparatus and method

ABSTRACT

A trajectory processing apparatus comprises a trajectory database configured to store a position coordinate of a movable body detected from a camera image in association with data that specifies the camera image from which the movable body is detected, and a camera image database configured to store the camera image. A control section fetches the position coordinate of the movable body and the specifying data for the camera image from which the movable body is detected from the trajectory database. Further, the position coordinate of the movable body fetched from the trajectory database is displayed in a display section as a trajectory of the movable body. Furthermore, the control section acquires from the camera image database the camera image specified by the specifying data fetched from the trajectory database. Moreover, this camera image is displayed in the display section.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority fromprior Japanese Patent Applications No. 2007-170703, filed Jun. 28, 2007;No. 2007-170704, filed Jun. 28, 2007; No. 2007-170705, filed Jun. 28,2007; No. 2007-170706, filed Jun. 28, 2007; and No. 2007-283727, filedOct. 31, 2007, the entire contents of all of which are incorporatedherein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a trajectory processing apparatus andmethod that process a trajectory indicative of a route of a movablebody, e.g., a person who moves in a monitored region.

2. Description of the Related Art

There has been conventionally known a trajectory processing apparatusdisclosed in JP-A 2006-350751 (KOKAI). This apparatus has a picturedatabase, a sales information database, a trajectory conversionprocessing section, and a trajectory database. In the picture database,pictures taken by a plurality of cameras installed in a store arerecorded in association with time information. In the sales informationdatabase, sales information input from a sales information input deviceis stored in association with a purchase time. The trajectory conversionprocessing section fetches a picture recorded in the picture databaseand executes image processing to this picture to create trajectory data.In the trajectory database, the trajectory data created by thetrajectory conversion processing section is recorded.

A person in charge of trajectory analysis specifies sales informationfrom the sales information database. Then, trajectory data in thetrajectory database is specified from a purchase time in this salesinformation. Further, a display shows a trajectory based on thistrajectory data. Then, the person in charge of trajectory analysis cananalyze the trajectory of a customer.

JP-A 2006-350751 (KOKAI) has a description that an image processingtechnology for pictures taken by cameras is used to extract a customer,trace the extracted customer, and obtain trajectory data. However,according to the current image processing technology, even if an entirearea in a store is shot without blind spots, tracing movement of onecustomer in the entire region in the store as one trajectory is verydifficult. For example, a trajectory is disconnected, or it iscounterchanged with a trajectory of another customer. As factors of suchan inconvenience, mixture of routes of a customer, a change in personcharacteristic amounts caused due to a difference between angles forwatching the same customer, movement of a customer himself/herself,e.g., raising hands or bending over, and others can be considered. Anycountermeasure for the problem that such an inconvenience frequentlyoccurs has not been proposed at all.

BRIEF SUMMARY OF THE INVENTION

A trajectory processing apparatus that can trace movement of onecustomer in an entire region in a store as one trajectory has beendemanded.

According to one aspect of the present invention, there is provided atrajectory processing apparatus comprising: a trajectory databaseconfigured to store a position coordinate of a movable body detectedfrom a camera image in association with data that specifies the cameraimage from which the movable body is detected; a camera image databaseconfigured to store the camera image; a data acquisition sectionconfigured to fetch the position coordinate of the movable body and thespecifying data of the camera image from which the movable body isdetected from the trajectory database; a trajectory display sectionconfigured to display the position coordinate of the movable bodyfetched by the data acquisition section as a trajectory of the movablebody; a camera image acquisition section configured to acquire a cameraimage specified by the specifying data fetched by the data acquisitionsection from the camera image database; and a camera image displaysection configured to display the camera image acquired by the cameraimage acquisition section.

Additional advantages of the invention will be set forth in thedescription which follows, and in part will be obvious from thedescription, or may be learned by practice of the invention. Theadvantages of the invention may be realized and obtained by means of theinstrumentalities and combinations particularly pointed out hereinafter.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention, andtogether with the general description given above and the detaileddescription of the embodiments given below, serve to explain theprinciples of the invention.

FIG. 1 is a block diagram showing a system configuration in anembodiment according to the present invention;

FIG. 2 is an explanatory drawing of an in-store layout in theembodiment;

FIG. 3 is a schematic view showing a data configuration of trajectorydata in the embodiment;

FIG. 4 is a schematic view showing a data configuration of edittrajectory data in the embodiment;

FIG. 5 is a schematic view showing an example of a trajectory editingscreen in the embodiment;

FIG. 6 is a flowchart showing a processing procedure of a trajectoryprocessing apparatus executed by a trajectory editing program in theembodiment;

FIG. 7 is a flowchart showing a primary processing procedure oftrajectory edit data creation processing depicted in FIG. 6;

FIG. 8 is a flowchart showing a primary processing procedure oftrajectory state definition processing depicted in FIG. 6;

FIG. 9 is a flowchart showing a primary processing procedure oftrajectory disabling processing depicted in FIG. 6;

FIG. 10 is a flowchart showing a primary processing procedure oftrajectory separation processing depicted in FIG. 6;

FIG. 11 is a flowchart showing a primary processing procedure of acoupling source trajectory reproduction processing depicted in FIG. 6;

FIG. 12 is a flowchart showing a primary processing procedure of acoordinate conversion processing depicted in FIG. 11;

FIG. 13 is a flowchart showing a primary processing procedure ofcoupling destination trajectory candidate retrieval processing depictedin FIG. 6;

FIG. 14 is a flowchart showing a primary processing procedure of markerregistration processing depicted in FIG. 6;

FIG. 15 is a flowchart showing a primary processing procedure ofcoupling definition processing depicted in FIG. 6;

FIG. 16 is a flowchart showing a primary processing procedure ofcoupling processing depicted in FIG. 6; and

FIG. 17 is a flowchart showing another embodiment of coupling sourcetrajectory reproduction processing.

DETAILED DESCRIPTION OF THE INVENTION

The best mode for carrying out the present invention will now beexplained hereinafter with reference to the accompanying drawings.

First Embodiment

This embodiment includes six cameras CA1 to CA6, a trajectory datageneration system 10, and a trajectory processing apparatus 20 as shownin a block diagram of FIG. 1.

In regard to the respective cameras CA, one camera (CA1) is disposed ona ceiling in a central portion in a store, two cameras (CA2 and CA3) aredisposed on the ceiling near a checkout counter CH where POS (Point OfSales) terminals 11 a and 11 b are placed, and three cameras (CA4, CA5,and CA6) are disposed on the ceiling at three positions on an inner sidein the store and right and left wall sides with respect to the checkoutcounter CH.

Of these cameras, the cameras CA1, CA2, and CA3 are cameras each using afish-eye lens, i.e., so-called fish-eye cameras, and the cameras CA4,CA5, and CA6 are cameras each having an omnidirectional mirror, i.e.,so-called omnidirectional cameras.

It is to be noted that the number of the cameras is not restricted tosix, and it may be three to five or seven or above. Further,combinations of the fish-eye cameras and the omnidirectional cameras arenot restricted to a pattern in this embodiment, and they can bearbitrarily changed.

The trajectory data generation system 10 extracts camera-specific frameimages in a fixed cycle from pictures taken by the respective camerasCA1 to CA6. Furthermore, the extracted camera-specific frame imagesobtained at the same timing are analyzed. If a movable body is detectedas a result, the trajectory data generation system 10 traces thismovable body as a target.

The trajectory generation system 10 adds a target ID as an intrinsicidentifier to a movable body every time the new movable body isdetected. The trajectory data generation system 10 generates originaltrajectory data in units of frame based on the target ID and informationobtained by tracing the movable body.

In this embodiment, the target ID is a serial number which isincremented by one starting from zero for convenience's sake. Moreover,a cycle of extracting each frame image is 1/15 second. This cycle can bechanged. For example, when more detailed trajectory data is required,shortening the cycle to, e.g., 1/30 second can suffice. When a filecapacity of an original trajectory database 31 must be reduced,increasing the cycle to, e.g., 1/10 second can suffice.

The trajectory processing apparatus 20 includes an input section 21, adisplay section 22, a communication section 23, a storage section 24, anoutput file 25, and a control section 26. Such an apparatus is realizedby a computer device, e.g., a personal computer.

That is, an input device such as a keyboard or a mouse is used as theinput section 21. A display device such as a liquid crystal display or aCRT display is used as the display section 22. The communication section23 has an interface function for the trajectory data generation system10. A general communication interface that a computer device has is usedas the communication section 23.

The storage section 24 stores various kinds of databases. For example, ahard disk drive is used as the storage section 24. Data processed by thetrajectory processing apparatus 20 is output to the output file 25. Arecording medium such as a memory card or a magneto optical disk is usedas the output file 25.

The control section 26 controls the respective sections, i.e., the inputsection 21, the display section 22, the communication section 23, thestorage section 24, and the output file 25 based on a preset program. ACPU (Central Processing Unit) and a main memory storing a programconstitute the control section 26.

The storage section 24 stores an original trajectory database 31, acamera image database 32, an edit trajectory database 33, a settingdatabase 34, a camera parameter database 35, an in-store area definitiondatabase 36, and an in-store map database 37.

The original trajectory database 31 stores original trajectory datagenerated from the camera-specific frame images obtained at the sametiming. The original trajectory data is generated by the trajectory datageneration system 10. The original trajectory data generated by thetrajectory data generation system 10 is taken into the trajectoryprocessing apparatus 20 through the communication section 23 to bestored in the original trajectory database 31.

As shown in FIG. 3, the original trajectory database 31 stores dataincluding original trajectory data generated from a camera-specificframe image of a top frame to original trajectory data generated from acamera-specific frame image of a last frame in order of shooting dataand time. The original trajectory data per frame includes a file name ofa camera image file, an offset value, shooting date and timeinformation, the number of targets, target information (ID, X, Y, and H)for the number of targets.

Respective frame images extracted at the same time from pictures takenby the respective cameras CA1 to CA6 are stored in one camera imagefile. At this time, different offset values are given to the respectiveframe images. A file name of this camera image file and an offset valueof each frame image become data that specifies a camera image from whicha movable body has been detected. This camera image specifying data isincorporated into original trajectory data generated in accordance witheach frame image.

The trajectory data generation system 10 detects a movable body fromeach frame image. An intrinsic target ID is given to the movable body.Additionally, a position of the movable body is calculated in athree-dimensional world coordinate system (X, Y, H).

In this embodiment, in a plan view of FIG. 2 showing the inside of astore, a corner on the left inner side is determines as an originalpoint (0, 0) of an X axis and a Y axis, and its floor is determined asan original point of an H (Height) axis. The number of the movablebodies detected from the frame images extracted at the same timing,i.e., a so-called number of targets, shooting date and time of each ofthe frame images, target information of each movable body (ID, X, Y, H)are incorporated in original trajectory data generated in accordancewith each frame image.

The camera image database 32 stores a camera image file. The cameraimage file stores respective frame images extracted at the same hourfrom pictures taken by the cameras CA1 to CA6 in accordance with each ofthe cameras CA1 to CA6.

The edit trajectory database 33 stores edit trajectory data. The edittrajectory data is generated based on the original trajectory data inaccordance with each movable body. FIG. 4 shows a data configuration ofthe edit trajectory data. As shown in the drawing, the edit trajectorydata includes an intrinsic trajectory ID, a start point coordinate, anend point coordinate, a plurality of pieces of index information,various kinds of status information, and various kinds of couplingdefinition information.

The start point coordinate is a two-dimensional coordinate (X0, Y0)indicative of a start point of a trajectory specified by a trajectoryID. The end point coordinate is a two-dimensional coordinate (Xn, Yn)indicative of an end point of this trajectory. The index information isgenerated in accordance with each frame image. One piece of indexinformation includes an in-store coordinate (X, Y, H) of a trajectoryspecified by a trajectory ID, shooting date and time information T of aframe image, and a change point flag F. There are three types of statusinformation, i.e., a state status, a disabling status, and a partialtrajectory status. There are three types of coupling definitioninformation, i.e., start point information, a pre-coupling ID, and apost-coupling ID.

The setting database 34 stores various kinds of setting data requiredfor a trajectory editing operation in advance.

The camera parameter database 35 stores various kinds of parameter dataconcerning the fish-eye cameras CA1 to CA3 and various kinds ofparameter data concerning the omnidirectional cameras CA4 to CA6.

The in-store area definition database 36 stores data required to definean area of the in-store in advance. In this embodiment, the in-store ispartitioned into an entrance area, a disabled area, and a sales area.

In FIG. 2, the entrance area is a rectangular area surrounded by abroken line on the in-store side from an entrance/exit IN/OUT. Atwo-dimensional coordinate (X, Y) of this entrance area is stored asentrance area definition data in the in-store area definition database36.

The disabled area is an area where customers cannot walk around forshopping. In FIG. 2, areas where store shelves R are installed and aninner area of the checkout counter CH correspond to the disabled area. Atwo-dimensional coordinate (X, Y) in this disabled area is stored asdisabled area definition data in the in-store area definition database36.

The sales area is an area where customers walk around for shopping. Anarea obtained by eliminating the entrance area and the disabled areafrom the inside of the shop corresponds to the sales area. Atwo-dimensional coordinate (X, Y) in this sales area is stored as salesarea definition data in the in-store area definition database 36.

The in-store map database 37 stores image data of an in-store map whichis similar to the in-stores plan view depicted in FIG. 2 in advance.

The store shelves R and others are placed in the store. Therefore, amovable body may be hidden behind the shelf so that the movable bodycannot be traced as a target in the middle of a process in some cases.Further, a plurality of movable bodies may overlap so that the movablebody cannot be traced as a target. When tracing the movable body oncebecomes impossible, in the trajectory data generation system 10, anothertrajectory ID is given to manage the movable body even if the movablebody is the same person.

The trajectory processing apparatus 20 has a function of extracting aplurality of pieces of trajectory data generated with respect to thesame person and editing a complete trajectory connecting a line at themoment that this person enters the store to a line at the moment thathe/she exits the store. This function is realized by a trajectoryediting program.

When an operator operates the input section 21 to instruct starting atrajectory editing operation, the trajectory editing program isactivated. When the trajectory editing program is activated, the controlsection 26 appropriately accesses the respective databases 31 to 37 inthe storage section 24 in accordance with the trajectory editingprogram, thereby executing the following trajectory editing processing.A flowchart of FIG. 6 shows a procedure of this processing.

The control section 26 displays a trajectory editing screen 40 in thedisplay section 22 in step 1. FIG. 5 shows an example of the trajectoryediting screen 40. As shown in the drawing, the trajectory editingscreen 40 is partitioned into a trajectory display section 41, a cameraimage display section 42, a traffic list display section 43, and acoordinate display section 44. Further, an icon 45 for markerregistration is displayed.

The trajectory display section 41 shows a plan view of an in-store mapbased on image data stored in the in-store map database 37. A scroll bar46 is provided in the trajectory display section 41. The scroll bar 46is synchronized with a shooting time of each of the cameras CA1 to CA6.When the operator slides the scroll bar 46 from a left end toward aright end in the screen, a shooting time passes. Furthermore, acoordinate of a movable body detected from frame images shot by therespective cameras CA1 to CA6 is superimposed and displayed on thein-store map as a trajectory.

The camera image display section 42 shows images shot by the respectivecameras CA1 to CA6 within a time specified by the scroll bar 46. Asshown in the drawing, images of the six cameras CA1 to CA6 can besimultaneously displayed in alignment. Moreover, one or more cameraimages selected from these images can be expanded to be displayed.

After displaying the trajectory editing screen 40, the control section26 executes trajectory data creation processing in step 2. A flowchartof FIG. 7 shows a processing procedure of this creation processing.

First, the control section 26 clears the edit trajectory database 33 instep 31. Then, the control section 26 presets a count value N in anumber counter to zero in step 32. This preset value zero is an initialvalue of a target ID that is given every time a new movable body isdetected in the trajectory data creation system 10.

After presetting the count value N of the number counter to zero, thecontrol section 26 retrieves original trajectory data having targetinformation in which a target ID is N (N is a value of the numbercounter) from the original trajectory database 31 in step 33.

When one or more pieces of relevant original trajectory data can bedetected (YES in step 34), the control section 26 generates edittrajectory data having the target ID N as a trajectory ID in step 35.Additionally, a start point coordinate (X0, Y0), an end point coordinate(Xn, Yn), and index information (X, Y, H, T, F) are incorporated intothis edit trajectory data.

That is, the control section 26 acquires target information having thetarget ID N from all the pieces of original trajectory data detectedfrom the original trajectory database 31. Further, a two-dimensionalcoordinate (X, Y) of target information acquired from originaltrajectory data having the oldest shooting date and time is incorporatedas the start point coordinate (X0, Y0) of the edit trajectory data.Furthermore, a two-dimensional coordinate (X, Y) of target informationacquired from original trajectory data having the latest shooting dateand time is incorporated as the end point coordinate (Xn, Yn) of theedit trajectory data. Moreover, a three-dimensional coordinate (X, Y, H)and shooting date and time information T of target information acquiredfrom each original trajectory data are incorporated as index informationof the edit trajectory data in chronological order of shooting date andtime. It is to be noted that the change point flag F of each indexinformation is reset.

When the edit trajectory data having a trajectory ID N is created, thecontrol section 26 stores this edit trajectory data in the edittrajectory database 33 in step 36. Then, the control section 26increments the number counter by 1 in step 37. Additionally, theprocessing of steps 33 to 37 is again executed.

The control section 26 repeats the processing of steps 33 to 37 whilethe original trajectory data having the target information (ID, X, Y, H)with the target ID N can be detected from the original trajectorydatabase 31. As a result, edit trajectory data in which a value of thetrajectory ID is incremented by 1 is generated based on the originaltrajectory data in the original trajectory database 31 and stored in theedit trajectory database 33.

When the original trajectory data having the target information with thetarget ID N cannot be detected from the original trajectory database 31at all in step 34, the control section 26 stores a value N−1 obtained bysubtracting 1 from the count value N of the number counter in thestorage section 24 as a last trajectory ID in step 38. Then, thetrajectory data creation processing is terminated.

When the trajectory data creation processing is terminated, the controlsection 26 subsequently executes state definition processing of thetrajectory in step 3. A flowchart of FIG. 8 shows a processing procedureof this state definition processing.

The control section 26 extracts the respective pieces of edit trajectorydata one by one from the edit trajectory database 33 in, e.g., ascendingorder of the trajectory IDs in step 40. Further, the control section 26sets a state status with respect to each extracted edit trajectory datain accordance with the following processing routine.

First, the control section 26 acquires a start point coordinate (X0, Y0)from the edit trajectory data in step 41. Further, the control section26 makes reference to the in-store area definition database 36 to judgewhether this start point coordinate (X0, Y0) is a coordinate defined asthe entrance area. If it is the coordinate of the entrance area, thecontrol section 26 acquires an end point coordinate (Xn, Yn) from theedit trajectory data in step 42. Furthermore, the control section 26makes reference to the in-store area definition database 36 to judgewhether this end point coordinate (Xn, Yn) is also a coordinate in theentrance area.

If the end point coordinate (Xn, Yn) is also the coordinate of theentrance area, the control section 26 checks index information of theedit trajectory data in chronological order of shooting date and time.As a result, when the index information including a coordinate otherthan the coordinate in the entrance area is detected, a movable bodycorresponding to this edit trajectory data has once exited the entrancearea and then returned to the entrance area. In this case, the controlsection 26 sets the state status to “entrance→entrance”.

When the index information including a coordinate other than thecoordinate in the entrance area is not detected at all in step 43, amovable body corresponding to this edit trajectory data has not exitedthe entrance area. In this case, the control section 26 sets the statestatus to “entrance”.

When the end point coordinate (Xn, Yn) is not the coordinate in theentrance area in step 42, the end point coordinate (Xn, Yn) is definedas the sales area or the disabled area. In this case, the controlsection 26 sets the state status to “entrance-inside of store”.

When the start point coordinate (X0, Y0) is not the coordinate in theentrance area in step 41, the control section 26 judges whether thisstart point coordinate (X0, Y0) is a coordinate defined as the disabledarea in step 44. When it is the coordinate in the disabled area, thecontrol section 26 acquires the end point coordinate (Xn, Yn) from theedit trajectory data in step 45. Moreover, the control section 26 makesreference to the in-store area definition database 36 to judge whetherthis end point coordinate (Xn, Yn) is a coordinate in the disabled area.

When the end point coordinate (Xn, Yn) is the coordinate in the disabledarea, the control section 26 checks index information of the edittrajectory data in chronological order of shooting date and time in step46. As a result, when the index information including a coordinate otherthan the coordinate in the disabled area is not detected at all, amovable body corresponding to this edit trajectory data has not exitedthe disabled area. In this case, the control section 26 sets the statestatus to “disabled”.

When the index information including the coordinate other than thecoordinate in the disabled area in step 46, a movable body correspondingto this edit trajectory data has once exited the disabled area andreturned to the disabled area. In this case, the control section 26 setsthe state status to “inside of store→inside of store”.

When the end point coordinate (Xn, Yn) is not the coordinate in thedisabled area in step 45, the control section 26 makes reference to thein-store area definition database 36 to judge whether this end pointcoordinate (Xn, Yn) is a coordinate in the sales area in step 47.

When the end point coordinate (Xn, Yn) is the coordinate in the salesarea, the control section 26 sets the state status to “inside ofstore-inside of store”. On the other hand, when the end point coordinate(Xn, Yn) is not the coordinate in the sales area, the end pointcoordinate (Xn, Yn) is a coordinate in the entrance area. In this case,the control section 26 sets the state status to “inside ofstore→entrance”.

When the start point coordinate (X0, Y0) is not the coordinate in thedisabled area in step 44, the start point coordinate (X0, Y0) is acoordinate in the sales area. In this case, the control section 26acquires the end point coordinate (Xn, Yn) from the edit trajectorydata. Additionally, the control section 26 makes reference to thein-store area definition database 36 to judge whether this end pointcoordinate (Xn, Yn) is a coordinate in the entrance area in step 48.

When the end point coordinate (Xn, Yn) is the coordinate in the entrancearea, the control section 26 sets the state status to “inside ofstore→entrance”. On the other hand, when the end point coordinate (Xn,Yn) is not the coordinate in the entrance area, the end point coordinate(Xn, Yn) is a coordinate in the sales area or the disabled area. In thiscase, the control section 26 sets the state status to “inside ofstore→inside of store”.

The control section 26 executes the above-explained processing routinewith respect to all the pieces of edit trajectory data stored in theedit trajectory database 33. Therefore, any one of the state statuses,i.e., “entrance→entrance”, “entrance”, “entrance→inside of store”,“inside of store→entrance”, “inside of store→inside of store”, and“disabled” is set with respect to each edit trajectory data. Here, thecontrol section 26 constitutes a trajectory defining section.

When the state definition processing for the trajectory is terminated,the control section 26 subsequently executes disabling processing forthe trajectory in step 4. A flowchart of FIG. 9 shows a processingprocedure of this disabling processing.

The control section 26 acquires setting data of disabling conditionsfrom the setting database 34 in step 50. As the disabling conditions,there are region conditions and time conditions. The region conditionsdisable a trajectory data whose starting position (a start point) orending position (an end point) is present in the disabled area. The timeconditions disable a trajectory data whose tracing time for a trajectoryis less than or equal to a preset threshold value. Whether theseconditions are enabled is set in accordance with respective conditionsby an operator in advance. The setting database 34 as a judgmentcondition storage section stores setting data of the disablingconditions.

The control section 26 that has acquired the setting data of thedisabling conditions first judges whether the region conditions areenabled in step 51. When the region conditions are not enabled, thecontrol section 26 advances to processing in step 54.

When the region conditions are enabled, the control section 26 extractsrespective pieces of edit trajectory data one by one from the edittrajectory database 33 in step 52, and checks state statuses of thesepieces of data (a judgment section). When the state status of each datais “disabled” (YES in step 53), the control section 26 sets a disablingstatus of this edit trajectory data to ON (a disabling processingsection). When the state status is not “disabled” (NO in step 53), thedisabling status remains OFF. The edit trajectory data having thedisabling status changed to ON is disabled. The disabled edit trajectorydata is not processed in a procedure of subsequent editing processing.

When checking the state statuses of all the pieces of edit trajectorydata in the edit trajectory database 33 is terminated, the controlsection 26 advances to processing of step 54. That is, the controlsection 26 judges whether the time conditions are enabled. When the timeconditions are not enabled, the disabling processing is terminated.

When the time conditions are enabled, the control section 26 extractsrespective pieces of edit trajectory data one by one from the edittrajectory database 33 in step 55. Further, the control section 26calculates a trajectory tracing time in step 56. That is, the controlsection 26 calculates an elapsed time from shooting date and timeinformation T of top index information of the edit trajectory data toshooting date and time information T of last index information of thesame (a time calculating section).

Then, the control section 26 compares this trajectory tracing time witha preset threshold value in step 57 (a comparison section). Thethreshold value is set in the setting database 34 by an operator inadvance. The control section 26 judges whether the trajectory tracingtime is less than or equal to the threshold value (the judgmentsection).

When the trajectory tracing time is less than or equal to the thresholdvalue (YES in step 57), the control section 26 sets a disabling statusof this edit trajectory data to ON (the disabling processing section).When the trajectory tracing time is longer than the threshold value (NOin step 57), the disabling status remains OFF.

When checking the trajectory tracing times of all the pieces of edittrajectory data in the edit trajectory database 33 is terminated, thedisabling processing is terminated.

When the trajectory disabling processing is terminated, the controlsection 26 then executes division processing for the trajectory in step5. A flowchart of FIG. 10 shows a processing procedure of this divisionprocessing.

The control section 26 extracts respective pieces of edit trajectorydata each having the disabling status not set to ON one by one from theedit trajectory database 33 in step 60. Furthermore, the control section26 executes the division processing with respect to each extracted edittrajectory data in accordance with the following processing routine.

First, the control section 26 executes trajectory tracing processing instep 61. That is, the control section 26 acquires index information fromthe edit trajectory data in chronological order of shooting date andtime. Moreover, the control section 26 collates a three-dimensionalcoordinate (X, Y, H) of each index information with a coordinate in eacharea defined in the in-store area definition database 36 to detect indexinformation having a coordinate in the disabled area changed from acoordinate in the entrance area or the sales area every time the indexinformation is acquired. Alternatively, the control section 26 detectsindex information having a coordinate in the entrance area or the salesarea changed from a coordinate in the disabled area. When correspondingindex information is detected, the control section 26 sets a changepoint flag F with respect to this index information in step 62. In thismanner, a change point is recorded in the edit trajectory data (a changepoint extraction section).

Then, the control section 26 judges whether the change point has beenrecorded in the edit trajectory data in step 63. When index informationhaving the change point flag set thereto is present, the change pointhas been recorded. In this case, the control section 26 executestrajectory division processing at this change point in step 64. Thisdivision processing is executed based on the following procedure.

First, the control section 26 adds a copy of the edit trajectory data tothe edit trajectory database 33. Subsequently, the control section 26adds 1 to the last trajectory ID. The last trajectory ID is stored inthe storage section 24 in step 38 of the trajectory data creationprocessing. The control section 26 determines the last trajectory ID asa trajectory ID of the copied edit trajectory data (which will bereferred to as a copy destination trajectory data hereinafter).

Subsequently, the control section 26 sequentially checks indexinformation of the copy destination trajectory data from the top.Furthermore, when index information having the change point flag setthereto is detected, the top index information to index informationimmediately before the index information having the change point flagset thereto are deleted. As a result, the index information having thechange point flag set thereto becomes the top index information of thecopy destination trajectory data. The control section 26 resets thechange point flag of this top index information. Moreover, atwo-dimensional coordinate (X, Y) of the top index information isdetermined as a start point coordinate (X0, Y0) of the copy destinationtrajectory data.

Then, the control section 26 executes the same processing as the statedefinition processing with respect to the copy destination trajectorydata to redefine the state status of the copy destination trajectorydata. When the state definition processing is terminated, the controlsection 26 sets a partial trajectory status of the copy destinationtrajectory data to ON. That is, the copy destination trajectory data isdefined as partial trajectory data.

The control section 26 executes the following processing with respect tothe edit trajectory data as a copy source (which will be referred to ascopy source trajectory data hereinafter).

First, the control section 26 sequentially checks index information ofthe copy source trajectory data from the top. Moreover, if indexinformation having the change point flag set thereto is detected, allthe pieces of index information following this index information aredeleted. Then, the control section 26 determines a two-dimensionalcoordinate of index information having the latest shooting date and timein the remaining pieces of index information after deletion as an endpoint coordinate (Xn, Yn) of the copy source trajectory data.

Subsequently, the control section 26 executes the same processing as thestate definition processing with respect to the copy source trajectorydata to redefine the state status of the copy source trajectory data.When the state definition processing is terminated, the control section26 sets the partial trajectory status of the copy source trajectory datato ON. That is, the copy source trajectory data is defined as partialtrajectory data.

With the above-described processing, the edit trajectory data having thechange point is divided into the partial trajectory data before thechange point (the copy source trajectory data) and the partialtrajectory data after the change point (the copy destination trajectorydata).

Then, the control section 26 judges whether the copy destinationtrajectory data has a further change point. Moreover, when the copydestination trajectory data has a further change point, theabove-explained trajectory division processing is again executed.

Thereafter, the control section 26 repeats the trajectory divisionprocessing until the copy destination trajectory data no longer has achange point. Thus, the edit trajectory data having the change point isdivided into a plurality of pieces of partial trajectory data having nochange point (a partial trajectory generating section).

When the trajectory division processing is terminated, the controlsection 26 disables the partial trajectory data in the disabled areafrom the respective pieces of partial trajectory data in step 65. Thatis, the control section 26 checks the state status of each partialtrajectory data (the judgment section). Additionally, when the partialtrajectory data having the state status set to “disabled” is detected,the disabling status of this partial trajectory data is set to ON.

When the respective pieces of processing of steps 61 to 65 have beenexecuted with respect to all the pieces of edit trajectory dataextracted from the edit trajectory database 33, the control section 26judges whether the time conditions are enabled as the disablingconditions in step 66. When the time conditions are not enabled, thisdivision processing is terminated.

When the time conditions are enabled, the control section 26 extractsrespective pieces of partial trajectory data each having the disablingstatus not set to ON one by one from the edit trajectory database 33.Further, the control section 26 executes the disabling processing forthe time conditions with respect to each extracted partial trajectorydata. That is, the control section 26 calculates a trajectory tracingtime of the partial trajectory data. Furthermore, the control section 26judges whether the trajectory tracing time is less than or equal to athreshold value. When the trajectory tracing time is less than or equalto the threshold value, the control section 26 sets the disabling statusof this partial trajectory data to ON.

When the above-explained processing is executed with respect to all thepieces of partial trajectory data extracted from the edit trajectorydatabase 33, the division processing for the trajectory is terminated.

When the division processing is executed, defining information of eachnon-disabled edit trajectory data stored in the edit trajectory database33 is set to any one of “entrance”, “entrance→entrance”,“entrance→inside of store”, “inside of store→inside of store”, and“inside of store→entrance”.

When the division processing for trajectory is terminated. The controlsection 26 extracts all pieces of enabled edit trajectory data eachhaving the disabling status not set to ON from the edit trajectorydatabase 33 in step 6. Furthermore, the control section 26 creates atrajectory list showing trajectory IDs, start point coordinates, and endpoint coordinates of the respective pieces of extracted edit trajectorydata. The trajectory list is displayed in the trajectory list displaysection 43.

Then, the control section 26 waits until a coupling source trajectorydata is selected from the trajectory list in step 7 (a first trajectoryselecting section).

An operator manipulates the input section 21 to select an ID of atrajectory as a coupling source trajectory data from the trajectorylist. When the trajectory ID is selected, the control section 26 storesthis selected trajectory ID as an ID of the coupling source trajectoryin step 8.

Subsequently, the control section 26 executes coupling source trajectoryreproduction processing in step 9. A flowchart of FIG. 11 shows aprocessing procedure of this reproduction processing.

First, the control section 26 sequentially searches the originaltrajectory database 31 starting from original trajectory data in a topframe in step 71. Further, the control section 26 acquires all pieces oforiginal trajectory data each having target information in which atarget ID matches with the coupling source trajectory ID (a dataacquisition section).

Then, the control section 26 acquires a camera image file name from eachacquired original trajectory data in step 72. Furthermore, the controlsection 26 acquires all camera image files to which this file name isset from the camera image database 32 (a camera image acquisitionsection).

Subsequently, the control section 26 compares shooting date and timeinformation of the respective pieces of acquired original trajectorydata in step 73. Moreover, it selects the original trajectory data inchronological order of shooting date and time information and executesthe following processing.

First, the control section 26 acquires a three-dimensional coordinate(X, Y, H) of target information whose target ID matches with thecoupling source trajectory ID from the selected original trajectory datain step 74. This three-dimensional coordinate is in a world coordinatesystem.

Then, the control section 26 extracts a frame image specified by anoffset value of the selected original trajectory data from the cameraimage files in step 75. Additionally, the control section 26 convertsthe acquired three-dimensional coordinate in the world coordinate systeminto a three-dimensional coordinate in a camera image system in step 76(a coordinate conversion section). This conversion processing isexecuted based on a procedure depicted in a flowchart of FIG. 12 inaccordance with each of the cameras CA1 to CA6.

It is to be noted that this conversion processing uses the followingparameters previously set in the camera parameter database 35.

-   -   A trajectory coordinate in the world coordinate system: x, y, h    -   A position of a camera in the world coordinate system: Wx, Wy,        Wz    -   A coordinate of the center of an image: Cx, Cy    -   A camera rotation angle around a coordinate axis in the world        coordinate system: Rx, Ry, Rz    -   Parameters of the omnidirectional camera: b, c, f    -   Parameters of the fish-eye camera: k1, k3, k5, scale

First, the control section 26 translates a trajectory coordinate (x, y,h) of a conversion target to a coordinate system (X0, Y0, Z0) using acamera position as an original point in step 81. This processing isexecuted based on the following arithmetic expression (1)

$\begin{matrix}{\begin{pmatrix}{X\; 0} \\{Y\; 0} \\{Z\; 0}\end{pmatrix} = {\begin{pmatrix}x \\y \\h\end{pmatrix} - \begin{pmatrix}{Wx} \\{Wy} \\{Wz}\end{pmatrix}}} & (1)\end{matrix}$

Then, the control section 26 rotates the translated trajectorycoordinate (X0, Y0, Z0) by using a camera rotation angle around thecoordinate axis in the world coordinate system to match axes of theworld coordinate system and the camera coordinate system with each otherin step 82. This processing is executed based on the followingarithmetic expressions (2) to (4)

$\begin{matrix}\left\lbrack {{Rotation}\mspace{14mu}{Around}\mspace{14mu} X{\mspace{11mu}\;}{Axis}} \right\rbrack & \; \\{\begin{pmatrix}{Xx} \\{Yx} \\{Zx}\end{pmatrix} = {\begin{pmatrix}1 & 0 & 0 \\0 & {\cos\;{Rx}} & {{- \sin}\;{Rx}} \\0 & {\sin\;{Rx}} & {\cos\;{Rx}}\end{pmatrix}\begin{pmatrix}{X\; 0} \\{Y\; 0} \\{Z\; 0}\end{pmatrix}}} & (2) \\\left\lbrack {{Rotation}\mspace{14mu}{Around}\mspace{14mu} Y\mspace{14mu}{Axis}} \right\rbrack & \; \\{\begin{pmatrix}{Xy} \\{Yy} \\{Zy}\end{pmatrix} = {\begin{pmatrix}{\cos\;{Ry}} & 0 & {\sin\;{Ry}} \\0 & 1 & 0 \\{{- \sin}\;{Ry}} & 0 & {\cos\;{Ry}}\end{pmatrix}\begin{pmatrix}{Xx} \\{Yx} \\{Zx}\end{pmatrix}}} & (3) \\\left\lbrack {{Rotation}\mspace{14mu}{Around}\mspace{14mu} Z\mspace{14mu}{Axis}} \right\rbrack & \; \\{\begin{pmatrix}{Xz} \\{Yz} \\{Zz}\end{pmatrix} = {\begin{pmatrix}{\cos\;{Rz}} & {{- \sin}\;{Rz}} & 0 \\{\sin\;{Rz}} & {\cos\;{Rz}} & 0 \\0 & 0 & 1\end{pmatrix}\begin{pmatrix}{Xy} \\{Yy} \\{Zx}\end{pmatrix}}} & (4)\end{matrix}$

Subsequently, the control section 26 determines a type of a camera as aprocessing target in step 83. In regard to each of the fish-eye camerasCA1, CA2, and CA3, parameters of the fish-eye camera are used to converta trajectory coordinate (Xz, Yz, Zz) from the world coordinate systeminto a camera image coordinate system in step 84. This processing isexecuted based on the following calculations (5) to (7).

First, Xd=r cos t: Yd=r sin t is assumed. In this expression, when Yz≧0,the following expression is achieved:

$\begin{matrix}{t = {\arccos\left( \frac{Xz}{\sqrt{{Xz}^{2} + {Yz}^{2}}} \right)}} & (5)\end{matrix}$When Yz<0, the following expression is achieved:

$\begin{matrix}{t = {{360{^\circ}} - {\arccos\left( \frac{Xz}{\sqrt{{Xz}^{2} + {Yz}^{2}}} \right)}}} & (6)\end{matrix}$Here, a value of r is obtained by using a Newton method in the followingexpression (7).

$\begin{matrix}\left\{ \begin{matrix}{r_{n + 1} = {r_{n} - \frac{{f\left( r_{n} \right)} - \theta}{f^{\prime}\left( r_{n} \right)}}} \\{{f\left( r_{n} \right)} = {\left( {{k_{1}r_{n}} + {k_{3}r_{n}^{3}} + {k_{5}r_{n}^{5}}} \right) \times {scale}}} \\{{f^{\prime}\left( r_{n} \right)} = {\left( {k_{1} + {3k_{3}r_{n}^{2}} + {5k_{5}r_{n}^{4}}} \right) \times {scale}}} \\{R = \sqrt{{Xn}^{2} + {Yz}^{2}}} \\{{{{When}\mspace{14mu}{Zz}} = 0},{\theta = {90{^\circ}}}} \\{{{{When}\mspace{14mu}{Zz}} < 0},{\theta = {\arccos\left( \frac{- R}{Zz} \right)}}} \\{{{{When}\mspace{14mu}{Zz}} > 0},{\theta = {{180{^\circ}} - {\arccos\left( \frac{R}{Zz} \right)}}}}\end{matrix} \right. & (7)\end{matrix}$

It is to be noted that, in this expression (7), an initial value r₀ is0.0, and a target value is θ. Furthermore, it is considered thatconvergence is attained when |r_(n+1)−r_(n)|<0.01. A value of r at thismoment is used.

On the other hand, in regard to each of the omnidirectional cameras CA4,CA5, and CA6, the parameters of the omnidirectional camera are used toconvert the trajectory coordinate (Xz, Yz, Zz) from the world coordinatesystem into the camera image coordinate system in step 85. Thisprocessing is executed based on the following arithmetic expression (8).

$\begin{matrix}\left\{ \begin{matrix}{{Xd} = \frac{{Xzf}\left( {b^{2} - c^{2}} \right)}{{\left( {b^{2} + c^{2}} \right)\left( {{Zz} - c} \right)} - {2{bc}\sqrt{{Xz}^{2} + {Yz}^{2} + \left( {{Zz} - c} \right)^{2}}}}} \\{{Yd} = \frac{{Yzf}\left( {b^{2} - c^{2}} \right)}{{\left( {b^{2} + c^{2}} \right)\left( {{Zz} - c} \right)} - {2{bc}\sqrt{{Xz}^{2} + {Yz}^{2} + \left( {{Zz} - c} \right)^{2}}}}}\end{matrix} \right. & (8)\end{matrix}$

When the trajectory coordinate is converted into the camera imagecoordinate system from the world coordinate system in this manner, thecontrol section 26 translates a converted coordinate (Xd, Yd) to anoriginal point of the camera image coordinate system in step 86. Thisprocessing is executed by the following arithmetic expression (9).

$\begin{matrix}{\begin{pmatrix}X \\Y\end{pmatrix} = {\begin{pmatrix}{Xd} \\{Yd}\end{pmatrix} + \begin{pmatrix}{Cx} \\{Cy}\end{pmatrix}}} & (9)\end{matrix}$

When the respective pieces of processing of steps 81 to 86 are executed,the three-dimensional coordinate of the target information acquired fromthe selected original trajectory data is converted into the coordinatein the camera image system of each of the cameras CA1 to CA6.

When the three-dimensional coordinate, the frame image, and the cameraimage system coordinate are acquired, the control section 26 displays atrajectory in the trajectory display section 41 in the trajectoryediting screen 40 based on the three-dimensional coordinate in step 77.At the same time, the control section 26 also displays the frame imagein the camera image display section 42. Further, it displays thecoupling source traffic ID in the camera image display section 42 basedon the camera image system coordinate (a display control section).

Thereafter, the control section 26 judges whether original trajectorydata having the second oldest shooting date and time has been acquiredfrom the original trajectory database 31 in step 78. When thecorresponding original trajectory data has been acquired, the controlsection 26 executes the respective pieces of processing of steps 74 to78 with respect to this original trajectory data. When the originaltrajectory data has not been acquired, this reproduction processing isterminated.

When the coupling source trajectory reproduction processing is executed,a trajectory selected by an operator from the trajectory list isdisplayed in the trajectory display section 41 of the trajectory editingscreen 40. Furthermore, the camera image display section 42 displayscamera images at the same time point in synchronization with thetrajectory. Moreover, the trajectory ID is given to a movable body anddisplayed in each camera image.

Therefore, comparing movement of the trajectory with the camera imagesenables the operator to readily confirm whether this trajectory tracesone customer. Additionally, when the trajectory is disconnected in themiddle of process, whether a trajectory tracing movement of a customerafter disconnection is present can be easily confirmed.

When a trajectory tracing movement of the customer after disconnectionhas been confirmed, coupling this trajectory with the trajectory beforedisconnection as one trajectory enables creating a complete trajectoryof one customer. Thus, this coupling operation will now be explained.

It is to be noted that the defining information of enabled edittrajectory data stored in the edit trajectory database 33 corresponds toone of “entrance”, “entrance→entrance”, “entrance→inside of store”,“inside of store→inside of store”, and “inside of store→entrance”. Amongothers, each edit trajectory data whose defining information is set to“entrance→entrance” or “entrance” corresponds to a complete trajectorytracing a route from entering the store to exiting the store.Furthermore, since the edit trajectory data whose defining informationis set to “inside of store→entrance” is data indicative of exiting thestore, it can be a coupling destination trajectory but cannot be acoupling source trajectory.

When the coupling source trajectory reproduction processing isterminated (YES in step 10), the control section 26 judges whether thisreproduced coupling source trajectory is a complete trajectory in step11. Specifically, the control section 26 searches the edit trajectorydatabase 33 to acquire edit trajectory data having a coupling sourcetrajectory ID as a trajectory ID. Moreover, a state status of this edittrajectory data is checked. Here, when the state status is“entrance→entrance” or “entrance”, this trajectory can be regarded asthe complete trajectory. When any other state status is set, this datacan be regarded as an incomplete trajectory. In case of the completetrajectory, the control section 26 proceeds to coupling definitionprocessing in step 18.

In case of the incomplete trajectory, the control section 26 executescoupling destination trajectory candidate retrieval processing in step12. A flowchart of FIG. 13 shows a processing procedure of thisretrieval processing.

The control section 26 acquires retrieval conditions from the settingdatabase 34 in step 91. As the retrieval conditions, there are “time”and “distance”, and one of them is set.

When “time” is set as the retrieval conditions, the control section 26acquires an end time of a coupling destination trajectory in step 92.That is, it acquires as the end time shooting date and time of indexinformation associated with the last frame from the edit trajectory datahaving the coupling source trajectory ID as a trajectory ID (an end timeacquisition section).

Then, the control section 26 searches the edit trajectory database 33 toextract edit trajectory data as a candidate for the coupling destinationtrajectory in step 93. Edit trajectory data whose state status is set to“entrance→inside of store”, “inside of store→inside of store”, or“inside of store→entrance” is a candidate for the coupling destinationtrajectory. When the edit trajectory data as a candidate for thecoupling destination trajectory is extracted, the control section 26acquires shooting date and time of index information associated with thetop frame as start date and time of the coupling destination trajectory.Further, a time difference between the start time of the couplingdestination trajectory and the end time of the coupling sourcetrajectory is calculated (a time difference calculating section).

When the time difference is calculated, the control section 26 judgeswhether the time difference is less than or equal to a preset thresholdvalue. When the time difference is less than or equal to the thresholdvalue, this edit trajectory data is left as a coupling destinationcandidate trajectory (a candidate extraction section). When the timedifference exceeds the threshold value, this edit trajectory data iseliminated as the coupling destination candidate.

When the above-explained processing has been executed with respect toall the pieces of edit trajectory data extracted from the edittrajectory database 33, the control section 26 creates a couplingdestination candidate list in step 94. This list includes trajectoryIDs, start point coordinates, and end point coordinates of respectivepieces of edit trajectory data remaining as coupling target candidates.The trajectory IDs, the start point coordinates, and the end pointcoordinates are aligned in the list in ascending order of timedifference. The coupling destination candidate list is displayed in thetrajectory list display section 43.

When “distance” is set as the retrieval conditions, the control section26 acquires an end position of the coupling source trajectory in step96. That is, the control section 26 acquires an end point coordinatefrom the edit trajectory data having the coupling source trajectory IDas the trajectory ID (an end point position detection section).

Then, the control section 26 searches the edit trajectory database 33 toextract edit trajectory data as a candidate for the coupling destinationtrajectory in step 96. When the edit trajectory data as a candidate forthe coupling destination trajectory is extracted, the control section 26acquires a start point coordinate of this data as a start point of thecoupling destination trajectory. Moreover, a distance between the startpoint of this coupling destination trajectory and the trajectory endpoint coordinate of the coupling source trajectory is calculated (adistance calculating section). When the distance is calculated, thecontrol section 26 judges whether this distance is equal to or smallerthan a preset threshold value. When the distance is equal to or smallerthan the threshold value, this edit trajectory data is left as acoupling destination candidate trajectory (the candidate extractionsection). When the distance exceeds the threshold value, this edittrajectory data is eliminated as the coupling destination candidate.

When the processing in step 96 and subsequent steps has been executedwith respect to all the pieces of edit trajectory data extracted fromthe edit trajectory database 33, the control section 26 creates acoupling destination candidate list in step 97. This list includestrajectory IDs, start point coordinates, and end point coordinates ofrespective pieces of edit trajectory data remaining as couplingdestination candidates. In the list, the trajectory IDs, the start pointcoordinates, and the end point coordinates are aligned in ascendingorder of distance. The coupling destination candidate list is displayedin the trajectory list display section 43.

When the coupling destination candidate retrieval processing isterminated, the control section 26 waits for a coupling destinationtrajectory to be selected from the coupling destination candidate listin step 13 (a second trajectory selecting section).

An operator manipulates the input section 21 to select an ID of atrajectory as a coupling destination trajectory from the couplingdestination candidate list. When the trajectory ID is selected, thecontrol section 26 executes coupling destination trajectory reproductionprocessing in step 14. A processing procedure of this reproductionprocessing is the same as that of the coupling source trajectoryreproduction processing depicted in FIG. 11 except target trajectorydata. Therefore, an explanation thereof will be omitted.

When the coupling destination trajectory reproduction processing isexecuted, the trajectory display section 41 in the trajectory editingscreen 40 displays a trajectory selected from the coupling destinationcandidate list by the operator. Further, the camera image displaysection 42 displays camera images obtained at the same time point insynchronization with the trajectory. Furthermore, a trajectory ID isdisplayed in each camera image at a position of a movable body.

Thus, the operator compares movement of the coupling destinationtrajectory with the camera images to confirm whether this couplingdestination trajectory is a trajectory that is to be coupled with thepreviously selected coupling source trajectory. As a result, when thecoupling destination trajectory is a trajectory of a person specified bythe ID of the coupling source trajectory and is coupled with thecoupling source trajectory, the operator manipulates the input section21 to instruct coupling. When coupling is not performed, the operatoroperates the input section 21 to instruct avoiding coupling.

The control section 26 judges whether the coupling destinationtrajectory is to be coupled with the coupling source trajectory in step15. When performing coupling is instructed, the control section 26advances to coupling definition processing of step 18. On the otherhand, when avoiding coupling is instructed, the control section 26proceeds to marker registration judgment processing of step 16.Moreover, when a trajectory has not been listed as a couplingdestination candidate in the processing in step 13, the control section26 likewise advances to the marker registration judgment processing ofstep 16.

In step 16, the control section 26 judges whether marker registrationhas been declared. When marker registration has not been declared, thecontrol section 26 returns to step 13 and waits until the next couplingdestination candidate is selected.

When a user creates a trajectory as a coupling destination candidate forhimself/herself, he/she clicks the marker registration icon 45 todeclare marker registration. When the marker registration icon 45 isclicked, the control section 26 determines that marker registration hasbeen declared in step 16. In this case, the control section 26 executesmarker registration processing in step 17. A flowchart of FIG. 14 showsa processing procedure of this marker registration processing.

The control section 26 displays a dot marking tool in the trajectorydisplay section 41 in the trajectory editing screen 40 in step 101.Additionally, it also resets a marking number counter P to zero in step102. Further, the control section 26 acquires an end point coordinate(Xn, Yn) from edit trajectory data having the coupling source trajectoryID as a trajectory ID in step 103.

Then, the control section 26 waits for a dot to be marked in thetrajectory display section 41 in step 104 (a trajectory input acceptancesection). The operator operates the tool to mark the dot at a positionthat becomes a start point of a trajectory as a coupling destinationcandidate in the trajectory display section 41.

When the dot is marked, the control section 26 acquires an in-storecoordinate (x, y) of this dot in step 105. Furthermore, it calculates adistance between this in-store coordinate (x, y) and an end coordinate(Xn, Yn) of the coupling source trajectory.

Subsequently, the control section 26 judges whether this distance isequal to or smaller than a threshold value used by candidate retrievalprocessing in step 106. When the distance exceeds the threshold value,the control section 26 clears the marked dot in step 107. Moreover, thecontrol section 26 returns to step 104 and waits until a dot is againmarked.

When the distance is equal to or smaller than the threshold value instep 106, the control section 26 increments the marking number counter Pby 1 in step 108. Additionally, a value of this marking number counter Pis determined as an address and an in-store coordinate (x1, y1) of themarked dot is stored in association with this address in step 109.

Then, the control section 26 waits for the next dot to be marked untiltermination of marking is instructed in step 110. Further, the controlsection 26 repeats the processing of steps 108 and 109 every time thenext dot is marked (YES in step 110). That is, the marking numbercounter P is incremented by 1, and a value of this marking numbercounter P is determined as an address to store an in-store coordinate(xp, yp) of each marked dot.

When the dots has been marked to reach a position of an end point of thetrajectory as the coupling destination candidate, the operatormanipulates the input section 21 to instruct termination of marking.When termination of the marking is instructed (YES in step 111), thecontrol section 26 adds 1 to a final trajectory ID in step 112.Furthermore, in step 113, the in-store coordinate (x1, y1) stored inassociation with the address=1 is determined as a start pointcoordinate. Moreover, in step 114, the in-store coordinate (xp, yp)stored in association with the address P is determined as an end pointcoordinate. Additionally, in step 115, trajectory index information iscreated from the respective in-store coordinates stored in associationwith the respective addresses 1 to P. In this case, a height H is apreset fixed value (e.g., 160 cm). Shooting date and time information Tof a frame image is determined to have a value set in the lasttrajectory index information of edit trajectory data having the setcoupling source trajectory ID.

The control section 26 creates edit trajectory data in which a finaltrajectory ID, the start point coordinate, the end point coordinate, andeach trajectory index information are set in step 116 (a trajectorygenerating section). The edit trajectory data is registered in the edittrajectory database 33 (a trajectory registering section).

Thereafter, the control section 26 executes the state definitionprocessing with respect to this registered edit trajectory data in step117. When the state definition processing is terminated, the controlsection 26 erases the marking tool in step 118. Then, the markerregistration processing is terminated.

It is to be noted that, when the scroll bar 46 in the trajectory displaysection 41 is manually operated through the input section 21, cameraimages obtained at a shooting date and time determined by a position ofthis scroll bar 46 are displayed in the camera image display section 42.

Then, the operator operates the scroll bar 46 to forward or reverse thecamera images. As a result, movement of a customer specified by thetrajectory ID of the coupling source trajectory can be confirmed.However, when the customer is hidden behind the store shelf, his/hermovement cannot be traced. In this case, the operator specifies asection where tracing has failed. Further, a trajectory corresponding tomovement of the customer in this section is created in the trajectorydisplay section 42 based on dot marking. Then, edit trajectory data ofthis trajectory is registered in the edit trajectory database 33. Thisedit trajectory data is determined as a coupling destination trajectorywith respect to the coupling source trajectory. Therefore, the controlsection 26 advances to coupling definition processing in step 18 whenthe marker registration processing is terminated.

A flowchart of FIG. 15 shows a processing procedure of the couplingdefinition processing in step 18. The control section 26 judges a statestatus of the edit trajectory data selected as the coupling sourcetrajectory in step 121.

When the state status of the coupling source trajectory is“entrance→entrance” or “entrance”, the coupling source trajectory is acomplete trajectory. In this case, the control section 26 determinesstart point of the edit trajectory data selected as the coupling sourcetrajectory as a “coupling source trajectory ID”. Both a pre-coupling IDand a post-coupling ID are set to “no setting”.

When the state status of the coupling source trajectory is“entrance→inside of store”, the coupling source trajectory includes astart time point of tracing. In this case, the control section 26 judgesa state status of the edit trajectory data selected as the couplingdestination trajectory in step 122.

When the state status of the coupling destination trajectory is “insideof store→inside of store”, the coupling destination trajectory is in theprocess of tracing. In this case, the control section 26 determines as a“coupling source trajectory ID” start point information of each of thetwo pieces of trajectory edit data selected as the coupling sourcetrajectory and the coupling destination trajectory. Furthermore, apre-coupling ID of the edit trajectory data selected as the couplingsource trajectory is set to “no setting”, and a post-coupling ID of thesame is set to a “coupling destination trajectory ID”. On the otherhand, a pre-coupling ID of the edit trajectory data selected as thecoupling destination trajectory is set to a “coupling source trajectoryID”, and a post-coupling ID of the same is not set.

When the state status of the coupling destination trajectory is “insideof store→entrance” or “entrance”, the coupling destination trajectoryincludes an end time point of tracing. In this case, the control section26 sets as the “coupling source trajectory ID” the start pointinformation of each of the two pieces of trajectory edit data selectedas the coupling source trajectory and the coupling destinationtrajectory. Moreover, the pre-coupling ID of the edit trajectory dataselected as the coupling source trajectory is set to “no setting”, andthe post-coupling ID of the same is set to the “coupling destinationtrajectory ID”. On the other hand, the pre-coupling ID of the edittrajectory data selected as the coupling destination trajectory is setto the “coupling source trajectory ID”, and the post-coupling ID of thesame is set to “no setting”.

When the state status of the coupling source trajectory is “inside ofstore→inside of store”, the coupling source trajectory is in the processof tracing. In this case, the control section 26 judges a state statusof the edit trajectory data selected as the coupling destinationtrajectory in step 123.

When the state status of the coupling destination trajectory is “insideof store→inside of store”, the coupling destination trajectory is alsoin the process of tracing. In this case, the control section 26 setsstart point information of the trajectory edit data selected as thecoupling destination trajectory to a “start point of the coupling sourcetrajectory”. Moreover, a pre-coupling ID of the edit trajectory dataselected as the coupling destination trajectory is set to a “couplingsource trajectory ID”, and a post-coupling ID is not set. Additionally,a post-coupling ID of the edit trajectory data selected as the couplingsource trajectory is set to a “coupling destination trajectory ID”.

When the state status of the coupling destination trajectory is “insideof store→inside of store”, the coupling destination trajectory includesan end time point of tracing. In this case, the control section 26 setsthe start point information of the edit trajectory data selected as thecoupling destination trajectory to the “staring point of the couplingsource trajectory”. Further, the pre-coupling ID of the edit trajectorydata selected as the coupling destination trajectory is set to the“coupling source traffic ID”, and the post-coupling ID is set to “nosetting”. Furthermore, the post-coupling ID of the edit trajectory dataselected as the coupling source trajectory is set as the “couplingdestination trajectory ID”.

When the coupling definition processing is terminated, the controlsection 26 judges whether the coupling source trajectory extending to astore exiting point has been defined in step 19. When the edittrajectory data selected as the coupling source trajectory is a completetrajectory, it is considered that the trajectory extending to the storeexiting point has been defined. Moreover, even if the state status ofthe edit trajectory data selected as the coupling destination trajectoryis “inside of store→entrance”, it is considered that the trajectoryextending to the store exiting point has been defined. In any othercase, it is considered that the trajectory extending to the storeexiting point has not been defined. When the trajectory extending to thestore exiting point has not been defined, the control section 26substitutes the edit trajectory data selected as the couplingdestination trajectory for the coupling source trajectory in step 20.Further, the control section 26 again executes the processing of step 9and subsequent steps.

When it is determined that the trajectory extending to the store exitingpoint has been defined in step 19, the control section 26 judges whethertermination of selection of a trajectory has been instructed in step 20.

When continuing the trajectory confirming operation, the operatoroperates the input section 21 to instruct continuation of selection of atrajectory. When terminating the trajectory confirming operation, theoperator manipulates the input section 21 to instruct termination ofselection of a trajectory.

When continuation of selection of a trajectory is instructed, thecontrol section 26 returns to the processing of step 6. That is, thecontrol section 26 displays the trajectory list in the trajectory listdisplay section 43 and waits for the next coupling source trajectory tobe selected.

When termination of selection of a trajectory is instructed, the controlsection 26 executes coupling processing in step 22. A flowchart of FIG.16 shows a processing procedure of this coupling processing. That is,the control section 26 first searches the edit trajectory database 33 toselect one piece of edit trajectory data having a pre-coupling ID set to“no setting” in step 131. The control section 26 recognizes the selectededit trajectory data as first trajectory data A.

Then, the control section 26 acquires a post-coupling ID of the edittrajectory data for this first trajectory data A in step 132.Furthermore, edit trajectory data having the post-coupling ID set as atrajectory ID is acquired from the edit trajectory database 33. Thecontrol section 26 recognizes the acquired edit trajectory data assecond trajectory data B.

Subsequently, the control section 26 compares start point information ofthe first trajectory data A with start point information of the secondtrajectory data B in step 133. When both the pieces of start pointinformation match with each other, the control section 26 compares atrajectory ID of the first trajectory data A with a pre-coupling ID ofthe second trajectory data B in step 134. When the IDs match with eachother, the control section 26 calculates a time difference between ashooting date and time of index information corresponding to a lastframe of the first trajectory data A and a shooting date and time ofindex information corresponding to a top frame of the second trajectorydata B in step 135. Moreover, the control section 26 judges whether thistime difference falls within one frame of a camera image (a couplingpoint judgment section).

When the time difference falls within one frame, the control section 26determines that an end point of the first trajectory data A matches witha start point of the second trajectory data B. The control section 26couples the first trajectory data A with the second trajectory data B instep 136. Specifically, the control section 26 reads all indexinformation from the top frame to the last from of the second trajectorydata B. Additionally, the read index information is added to the end ofthe index information corresponding to the last frame of the firsttrajectory data A. Further, the control section 26 substitutes an endpoint coordinate of the first trajectory data A for a two-dimensionalcoordinate of the index information corresponding to the last frame readfrom the second trajectory data B. Furthermore, the control section 26executes the same processing as the state definition processing withrespect to the first trajectory data A to redefine the state status. Asa result, new edit trajectory data indicative of a trajectory from thestart point of the coupling source trajectory to the end point of thecoupling destination trajectory (a trajectory coupling section).

When the time difference in shooting date and time is longer than oneframe, the end point of the first trajectory data A does not match withthe start point of the second trajectory data B. In this case, thecontrol section 26 executes an interpolation processing (aninterpolating section). As the interpolation processing, there is linearinterpolation that connects the end point of the first trajectory data Awith the start point of the second trajectory data B by a straight line.Since movement of a customer in the store is mainly slow walking, linearinterpolation can realize sufficient interpolation processing. After theinterpolation processing, the control section 26 executes couplingprocessing in step 136.

Thereafter, the control section 26 checks a post-coupling ID of thesecond trajectory data B in step 137. When the post-coupling ID is otherthan “no setting”, the control section 26 substitutes the firsttrajectory data A for the second trajectory data B to again execute theprocessing of step 132 and subsequent steps.

When the post-coupling ID of the second trajectory data B is “nosetting”, the control section 26 judges whether any other edittrajectory data having a pre-coupling ID set to “no setting” is presentin step 138. If there is another edit trajectory data, the controlsection 26 again executes the processing of step 131 and subsequentsteps. If there is no such data, the coupling processing is terminated.

When the coupling processing is terminated, the control section 26detects complete trajectory data from the edit trajectory data stored inthe edit trajectory database 33 in step 23. The complete trajectory datahas a state status set to “entrance→entrance” or “entrance”. That is,the control section 26 detects edit trajectory data having a statestatus set to “entrance→entrance” or “entrance” as the completetrajectory data (a complete trajectory detection section). The controlsection 26 outputs the complete trajectory data to the output file 25 (acomplete trajectory output section). After the data is output, thetrajectory editing program is terminated.

When the operator operates the input section 21 to select trajectorydata that is a coupling source and trajectory data that is a couplingdestination from the edit trajectory database 33 in this manner,trajectory data indicative of a trajectory from a start point of thetrajectory data as the coupling source and an end point of thetrajectory data as the coupling destination is automatically generatedin the trajectory processing apparatus 20. Therefore, routes of acustomer who has entered from the entrance/exit IN/OUT, walked around inthe store, and exited the store after making payment at the checkoutcounter CH can be connected through one trajectory.

In this case, since the trajectory editing screen 40 displays atrajectory selected by the operator, the operator can couple atrajectory as a coupling source with a trajectory as a couplingdestination while visually confirming them. Further, since thetrajectory editing screen 40 also displays camera images obtained byshooting a customer whose trajectory has been displayed, the operatorcan couple trajectorys while confirming whether a person having acoupling source trajectory is equal to a person having a couplingdestination trajectory.

Furthermore, in the trajectory processing apparatus 20, only edittrajectory data determined to have at least one of a start point and anend point present in a monitoring target region is displayed in the listas a trajectory that is a coupling destination. Therefore, candidatesfor the coupling destination trajectory are narrowed down, therebysimplifying an selecting operation.

Moreover, in the trajectory processing apparatus 20, whether an endpoint position of trajectory data selected as a coupling sourcetrajectory matches with a start point position of trajectory dataselected as a coupling destination trajectory is judged. Additionally,when the end point does not match with the start point, a space betweenthe end point and the start point is automatically interpolated.

Further, there may be a case where a customer is hidden behind, e.g., astore shelf, an advertising poster of an article for sale, or a POPplaced in the store so that a trajectory cannot be traced from cameraimages. Even in such a case, a trajectory in a section where tracing isimpossible can be manually created by the marker registering function inthe trajectory processing apparatus 20.

Therefore, trajectorys of a person who has entered from theentrance/exit, walked around in the store, and exited the stored can beassuredly coupled by one line.

Furthermore, in the trajectory processing apparatus 20, reference datathat is used to judge validity of edit trajectory data is previouslyset. Moreover, each edit trajectory data stored in the edit trajectorydatabase 33 is collated with the reference data to judge validity of theedit trajectory data. The edit trajectory data determined to be invalidis disabled. The disabled edit trajectory data cannot be used insubsequent processing.

As the reference data, there is data concerning a presence region anddata concerning a presence time. The inside of the store as a monitoringregion is partitioned into an enabled region where customers can bepresent and a disabled region where they cannot be present. Moreover, atrajectory having a very short tracing time can be ignored.

When data concerning the presence region is set as the reference data,edit trajectory data having at least one of a start point and an endpoint of a trajectory present in the disabled region is disabled in thetrajectory processing apparatus 20. When data concerning the presencetime is set as the reference data, edit trajectory data having anelapsed time from a start point to an end point of a trajectory beingless than or equal to a threshold value in advance is disabled in thetrajectory processing apparatus 20.

In this manner, the trajectory processing apparatus 20 can automaticallydisable unnecessary edit trajectory data that does not meet thereference data from a wide variety of edit trajectory data generated inthe trajectory processing apparatus 20. Therefore, the subsequentediting operation for coupling trajectorys can be efficiently carriedout.

Moreover, in the trajectory processing apparatus 20, a trajectory of amovable body specified by edit trajectory data can be traced inaccordance with each edit trajectory data stored in the edit trajectorydatabase 33. Additionally, when a movable body cuts across a boundarybetween the enabled region and the disabled region, a point where themovable body has cut across is extracted as a change point. Edittrajectory data having the change point extracted therefrom is dividedat this changed point. Of the divided partial trajectory data, data thatdoes not meet the reference data is disabled.

In the trajectory data generation system 10, a trajectory may be drawnon, e.g., a store shelf where a customer cannot move depending on anaccuracy of image processing. Even in such a case, a part which isapparently invalid as a trajectory can be assuredly eliminated in thetrajectory processing apparatus 20. Therefore, the highly reliabletrajectory editing operation can be realized.

Second Embodiment

A second embodiment in which the coupling source trajectory reproductionprocessing is changed will now be explained. A flowchart of FIG. 17shows a processing procedure of this reproduction processing.

It is to be noted that, in the second embodiment, a division point flagS is added to one piece of index information constituting originaltrajectory data. Any other structures are the same as those in the firstembodiment.

First, a control section 26 reads edit trajectory data having a setcoupled source trajectory ID from an edit trajectory database 33 in step141. Further, top index information is acquired from this edittrajectory data.

Then, the control section 26 searches an original trajectory database 31to acquire original trajectory data having set shooting date and timeinformation T of the obtained index information in step 142.Furthermore, an in-store coordinate (X, Y, H) is acquired from theobtained index information in step 143. Moreover, in step 144, a frameimage specified by an offset value of the obtained original trajectorydata is extracted from a camera image database 32.

Subsequently, the control section 26 converts the obtained in-storecoordinate (X, Y, H), i.e., a three-dimensional coordinate in a worldcoordinate system into a coordinate in a corresponding camera imagesystem in step 145. This conversion processing is executed based on theprocedure depicted in FIG. 12.

When the in-store coordinate (X, Y, H), the frame image, and the cameraimage system coordinate are obtained, the control section 26 displays atrajectory in a trajectory display section 41 based on the in-storecoordinate (X, Y, H) in step 146. Additionally, at the same time, thecontrol section 26 also displays the frame image in a camera imagedisplay section 42. Further, it also displays a coupling sourcetrajectory ID in the camera image display section 42.

Then, the control section 26 judges whether stopping reproduction of thetrajectory has been instructed in step 147. When stopping reproductionhas not been instructed, the control section 26 judges whether dividingthe trajectory has been instructed in step 148 (a division pointacceptance section). When division has not been instructed, the controlsection 26 judges whether the next index information is present in theedit traffic data having the set coupling source trajectory ID in step150. When this information is present, the control section 26 acquiresthis index information in step 151. Furthermore, the processing of steps142 to 149 is executed based on this index information.

With the above-explained processing, a trajectory associated with theedit trajectory data having the set coupling source trajectory ID isreproduced in the trajectory display section 41 in the trajectoryediting screen 40. When dividing the trajectory that is in the processof reproduction, an operator operates an input section 21 to instructdividing the trajectory.

When dividing the trajectory is instructed (YES in step 148), thecontrol section 26 sets the division point flag S of the obtained indexinformation to 1 in step 149. Subsequently, the control section 26advances to the processing of step 150.

Moreover, when stopping reproduction of the trajectory, the operatormanipulates the input section 21 to instruct stopping reproduction. Whenstopping reproduction is instructed (YES in step 147), the controlsection 26 resets the division point flags S of all the pieces of indexinformation in the edit trajectory data having the set coupling sourcetrajectory ID to zero in step 158. Then, the coupling source trajectoryreproduction processing is terminated. When the coupling sourcetrajectory reproduction processing is terminated, reproduction of thetrajectory is stopped.

When stopping reproduction is not instructed, last index information iseventually acquired from the edit trajectory data having the setcoupling source trajectory ID. When the last index information isacquired, the control section 26 judges whether the division point flagsS have been set in all the pieces of index information in the edittrajectory data in step 152. When index information having the divisionpoint flag S set therein is not present, the coupling source trajectoryreproduction processing is terminated.

When even one piece of index information having the division point flagS set therein is present, the control section 26 executes trajectorydivision processing at this division point in step 153 (a trajectorydividing section). This processing is executed simultaneously with thedivision processing at the change point in step 64 depicted in FIG. 10.

That is, the control section 26 adds a copy of the edit trajectory datahaving this coupling source trajectory ID set therein to the edittrajectory database 33. Furthermore, a trajectory ID of this copied edittrajectory data is substituted by a value obtained by adding 1 to a lasttrajectory ID. At this time, 1 is also added to the stored lasttrajectory ID. Moreover, a top index information to index informationimmediately before index information having the division point flag Sset therein in the copied edit trajectory data are deleted. As a result,the index information having the division point flag S set thereinbecomes top index information.

The control section 26 resets the division point flag S of this topindex information. Additionally, a two-dimensional coordinate of thistop index information is determined as a start point coordinate (X0, Y0)of the edit trajectory data. Further, state definition processing isexecuted with respect to this edit trajectory data to update a statestatus. Thereafter, the control section 26 sets a partial trajectorystatus to ON to provide partial edit trajectory data (a partialtrajectory registering section).

On the other hand, index information having the division point flag Sset therein and subsequent pieces of index information in the copysource edit trajectory data are deleted. Furthermore, a two-dimensionalcoordinate of index information having the latest date and time inremaining pieces of index information is determined as an end pointcoordinate (Xn, Yn) of this edit trajectory data. Moreover, the sameprocessing as the state definition processing is also executed withrespect to this edit trajectory data to update a state status.Additionally, a partial trajectory status is set to ON to providepartial edit trajectory data (the partial trajectory registeringsection).

In this manner, the edit trajectory data having the division point isautomatically divided into a partial trajectory record before thedivision point and a partial trajectory record after the division point.

Subsequently, the control section 26 checks whether index informationhaving the division point flag S set therein is present in the copiedpartial edit trajectory data (the partial trajectory record after thedivision point). When the index information having the division pointflag S set therein is detected, this edit trajectory data is dividedinto partial trajectory data before the division point and partialtrajectory data after the division point like the above explanation.

When the edit trajectory data having the division point is divided intothe plurality of pieces of partial trajectory data each having nodivision point, the control section 26 displays a list of the pluralityof pieces of partial trajectory data in a trajectory list displaysection 43 in step 154. Further, the control section 26 judges whetherdisabling is instructed in accordance with each partial trajectory data.

The operator manipulates the input section 21 to select partialtrajectory data to be disabled from the trajectory list display section43. When at least one partial trajectory record is selected (YES in step155), the control section 26 sets a disabling status of the selectedpartial trajectory data to ON in step 156. Thereafter, the controlsection 26 erases the list of the partial trajectory data in step 157.Then, the coupling source trajectory reproduction processing isterminated.

When the coupling source trajectory reproduction processing based on theabove-explained procedure is executed, the trajectory display section 41in the trajectory editing screen 40 displays a trajectory having thetrajectory ID selected from the trajectory list by the operator.Furthermore, camera images obtained at the same time point are displayedin the camera image display section 42 in synchronization with thistrajectory. Therefore, the operator can readily judge whether thetrajectory is a result of tracing one person by comparing movement ofthe trajectory with the camera images.

Moreover, the operator can manually forward or reverse an image of thecoupling source trajectory and camera images synchronized therewith byoperating a scroll bar 46 during reproduction of the coupling sourcetrajectory. Additionally, the trajectory that is in the process ofreproduction can be divided into two or more parts at a predeterminedtiming. Further, the divided partial trajectory data can beappropriately disabled.

For example, when the operator has confirmed that tracing a trajectoryof the same person that is in the process of reproduction failed andchanged to a trajectory of the other person during the process, he/shedivides the one trajectory into trajectorys of respective persons by amanual operation. Furthermore, trajectory data that has becomeunnecessary due to division is disabled by a manual operation. Executingdivision and the trajectory correcting operation for disabling asrequired enables effectively exploiting the trajectory data that hasfailed in tracing the same person.

It is to be noted that the present invention is not restricted to theforegoing embodiments, and constituent elements can be modified andembodied without departing from the scope of the invention on anembodying stage.

In each of the foregoing embodiments, the example where the trajectoryediting screen 40 is partitioned into the trajectory display section 41and the camera image display section 42 to display a trajectory andcamera images synchronized with this trajectory has been explained.However, a first display section for displaying a trajectory and asecond display section for displaying images may be provided to displaya trajectory and camera images synchronized with this trajectory,respectively.

In each of the foregoing embodiments, the example where a trajectory andcamera image as moving pictures synchronized with this trajectory aredisplayed has been explained. However, camera images that are stillpictures rather than moving pictures may be displayed.

In each of the foregoing embodiments, the example where a disablingstatus of edit trajectory data is set to ON as means for disabling theedit trajectory data has been explained. However, the disabling means isnot restricted thereto. For example, edit trajectory data to be disabledmay be deleted from the edit trajectory database 33.

In each of the foregoing embodiments, a presence position and a presencetime of a trajectory have been exemplified as a reference for disablingedit trajectory data. However, the items that can be the reference arenot restricted thereto. For example, reference data concerning a lengthof a trajectory is set in advance. Furthermore, the trajectory lengthmay be calculated based on edit trajectory data, and edit trajectorydata having the trajectory length which does not meet the reference maybe disabled.

In each of the foregoing embodiments, the change point flag F and thedivision point flag S are provided in index information. However, thechange point flag F is used in the automatic division processing, andthe division point flag S is used in the manual division processing.Therefore, one of these flags may be used as a common flag.

The trajectory processing apparatus according to this embodiment mayhave a function of just generating trajectory data indicative of atrajectory of a start point of first edit trajectory data to an endpoint of second edit trajectory data when an operator selects the firstedit trajectory data and the second edit trajectory data from edittrajectory data stored in the edit trajectory database 33. That is, inFIG. 6, the disabling processing in step 4, the division processing instep 5, and the coupling destination candidate retrieval processing instep 12 may be omitted. However, it is needless to say that adding thesetypes of processing enables efficiently executing the trajectorycoupling operation as explained above.

Additional advantages and modifications will readily occur to thoseskilled in the art. Therefore, the invention in its broader aspects isnot limited to the specific details and representative embodiments shownand described herein. Accordingly, various modifications may be madewithout departing from the spirit or scope of the general inventiveconcept as defined by the appended claims and their equivalents.

What is claimed is:
 1. A trajectory processing apparatus comprising: atrajectory database configured to store trajectory data indicative of atrajectory from a start point to an end point of each of a plurality ofmovable bodies that move in a monitoring region; a first trajectoryselecting section configured to accept an selective input of firsttrajectory data from the trajectory data stored in the trajectorydatabase; a second trajectory selecting section configured to accept aselective input of second trajectory data that is to be coupled with thefirst trajectory data from the trajectory data stored in the trajectorydatabase; and a trajectory coupling section configured to generatetrajectory data indicative of a trajectory from a start point of thefirst trajectory data to an end point of the second trajectory data whenthe first trajectory data and the second trajectory data are selected.2. The apparatus according to claim 1, further comprising: a trajectorydisplay section configured to display a trajectory of the movable bodybased on the trajectory data stored in the trajectory database.
 3. Theapparatus according to claim 1, wherein the trajectory data is generatedfrom a camera image obtained by shooting the monitoring region.
 4. Theapparatus according to claim 3, further comprising a camera imagereproducing section configure to reproduce the camera image, wherein thecamera image reproducing section reproduces an image obtained byshooting a movable body having the trajectory displayed in thetrajectory display section.
 5. The apparatus according to claim 1,further comprising: a judgment condition storing section configured tostore condition data required to judge validity and invalidity of thetrajectory data; a judgment section configured to collate eachtrajectory data stored in the trajectory data with the condition data tojudge validity and invalidity; and a disabling processing sectionconfigured to disable trajectory data determined to be invalid by thejudgment section.
 6. The apparatus according to claim 5, wherein thecondition data is at least one of data concerning a presence region ofthe trajectory and data concerning a presence time of the same.
 7. Theapparatus according to claim 5, further comprising: an area definitiondatabase configured to store area definition data that is used to definethe monitoring region as an enabled region where the movable body can bepresent and a disabled region where the movable body cannot be present;and a trajectory defining section configured to define an area where astart point and an end point of each trajectory in accordance with eachtrajectory data stored in the trajectory database based on the areadefinition data stored in the area definition database, wherein thejudgment section determines trajectory data which is defined to have atleast one of the start point and the end point being present in thedisabled region as being invalid.
 8. The apparatus according to claim 7,further comprising: a change point extraction section configured totrace a trajectory of the movable body in accordance with eachtrajectory data stored in the trajectory database based on thedefinition data stored in the area definition database and extracting apoint where the movable body cuts across a boundary between the enabledregion and the disabled region as a change point; and a partialtrajectory generating section configured to generate a plurality ofpieces of partial trajectory data by dividing the trajectory data at thechange point when the trajectory data has the change point, and thejudgment section further judges partial trajectory data which is definedto have all trajectorys being present in the disabled region as beinginvalid.
 9. The apparatus according to claim 5, wherein the trajectorydatabase stores trajectory data indicative of a trajectory from a startpoint to an end point of each of a plurality of movable bodies that movein the monitoring region together with time data from which at least astart point and an end point of a trajectory of each movable body aredetected, the apparatus further comprises: a time calculating sectionconfigured to calculate an elapsed time from a start point to an endpoint of each trajectory in accordance with each trajectory data storedin the trajectory database; and a comparison section configured tocompare the elapsed time calculated by the time calculating section witha preset threshold value, and the judgment section determines trajectorydata having the elapsed time determined to be equal to or smaller thanthe threshold value by the comparison section as being invalid.
 10. Theapparatus according to claim 5, wherein the trajectory database storestrajectory data indicative of a trajectory from a start point to an endpoint of each of a plurality of movable bodies that move in themonitoring region together with time data from which at least a startpoint and an end point of a trajectory of each movable body aredetected, the apparatus further comprises: an area definition databaseconfigured to store area definition data that is used to define themonitoring region as an enabled region where the movable bodies can bepresent and a disabled region where the movable bodies cannot bepresent; a trajectory defining section configured to define an areawhere a start point and an end point of each trajectory are present inaccordance with each trajectory data stored in the trajectory databasebased on the area definition data stored in the area definitiondatabase; a time calculating section configured to calculate an elapsedtime from a start point to an end point of each trajectory in accordancewith each trajectory data stored in the trajectory database; and acomparison section configured to compare the elapsed time calculated bythe time calculating section with a preset threshold value, and thejudgment section has region judging means for determining trajectorydata having at least one of the start point and the end point defined tobe present in the disabled region as being invalid and time judgingmeans for determining trajectory data having the elapsed time determinedto be equal to or smaller than the threshold value by the comparisonsection as being invalid.
 11. The apparatus according to claim 1,further comprising: an area definition database configured to store areadefinition data that is used to partition the monitoring region into anentrance/exit region and a monitoring target region; and a trajectorydefining section configured to define an area where a start point and anend point of a trajectory are present in accordance with each trajectorydata stored in the trajectory data based on the area definition datastored in the area definition database.
 12. The apparatus according toclaim 11, further comprising: a complete trajectory detection sectionconfigured to detect trajectory data indicating that each area where astart point and an end point of a trajectory are present is placed inthe entrance/exit region as complete trajectory data; and a completetrajectory output section configured to output trajectory data detectedby the complete trajectory detection section.
 13. The apparatusaccording to claim 1, further comprising: a coupling point judgmentsection configured to judge whether an end point position of the firsttrajectory data matches with a start point position of the secondtrajectory data; and an interpolating section configured to interpolatea space between the end point and the start point when the end point ofthe first trajectory data does not match with the start point of thesecond trajectory data.
 14. The apparatus according to claim 1, furthercomprising: an end point position detection section configured to detectan end point position of the first trajectory data; a distancecalculating section configured calculate a distance between a startpoint position of trajectory data and the end point position of thefirst trajectory data in accordance with each trajectory data stored inthe trajectory database; and a candidate extraction section configuredto list trajectory data having a distance calculated by the distancecalculating section being less than or equal to a preset threshold valueas a candidate for the second trajectory data, wherein the secondtrajectory selecting section accepts a selective input of the secondtrajectory data from the trajectory data listed by the candidateextraction section.
 15. The apparatus according to claim 14, furthercomprising: a coupling point judgment section configured to judgewhether an end point position of the first trajectory data selected bythe first trajectory selecting section matches with a start pointposition of the second trajectory data selected by the second trajectoryselecting section; and an interpolating section configured tointerpolate a space between the end point of the first trajectory dataand the start point of the second trajectory data when the points do notmatch with each other.
 16. The apparatus according to claim 1, whereinthe trajectory database stores trajectory data indicative of atrajectory from a start point to an end point of each of a plurality ofmovable bodies that move in the monitoring region together with timedata from which at least a start point and an end point of a trajectoryof the trajectory data are detected, the apparatus further comprises: anend point time acquisition section configured to acquire time at whichan end point of the first trajectory data is detected; a time differencecalculating section configured to calculate a difference between a timeat which a start point of trajectory data is detected and a time atwhich an end point of the first trajectory data is detected inaccordance with each trajectory data stored in the trajectory database;and a candidate extraction section configured to list trajectory datahaving a time difference calculated by the time difference calculatingsection being less than or equal to a preset threshold value as acandidate for the second trajectory data, and the second trajectoryselecting section accepts a selective input of the second trajectorydata from trajectory data listed by the candidate extraction section.17. The apparatus according to claim 16, further comprising: a couplingpoint judgment section configured to judge whether an end point positionof the first trajectory data selected by the first trajectory selectingsection matches with a start point position of the second trajectorydata selected by the second trajectory selecting section; and aninterpolating section configured to interpolate a space between the endpoint of the first trajectory data and the start point of the secondtrajectory data when the points do not match with each other.
 18. Atrajectory processing apparatus comprising: a trajectory databaseconfigured to store trajectory data indicative of a trajectory from astart point to an end point of each of a plurality of movable bodiesdetected from a camera image obtained by shooting a monitoring region; atrajectory selecting section configured to select trajectory data as anediting target from the trajectory data stored in the trajectorydatabase; a trajectory display section configured to display atrajectory of the movable body based on the trajectory data selected bythe trajectory selecting section; a camera image display sectionconfigured to display a camera image from which the movable bodyindicated by the trajectory is detected in synchronization with atrajectory of the trajectory displayed in the trajectory displaysection; a division point acceptance section configured to accept aninstruction input of a division point for the trajectory displayed inthe trajectory display section; a trajectory dividing section configuredto divide the trajectory of the trajectory data selected by thetrajectory selecting section at the division point accepted by thedivision point acceptance section; a partial trajectory registeringsection configured to register data of each partial trajectory dividedby the trajectory dividing section in the trajectory database; and atrajectory coupling section configured to edit two or more pieces oftrajectory data selected from the trajectory data stored in thetrajectory database to become data of one coupled trajectory.
 19. Atrajectory processing apparatus comprising: a trajectory databaseconfigured to store trajectory data indicative of a trajectory from astart point to an end point of each of a plurality of movable bodiesdetected from a camera image obtained by shooting a monitoring region; atrajectory selecting section configured to select trajectory data as anediting target from the trajectory data stored in the trajectorydatabase; a trajectory display section configured to display atrajectory of the movable body based on the trajectory data selected bythe trajectory selecting section; a camera image display sectionconfigured to display a camera image from which the movable bodyindicated by the trajectory is detected in synchronization with atrajectory of the trajectory displayed in the trajectory displaysection; a trajectory input acceptance section configured to accept aninput for generation of a trajectory that is to be coupled with thetrajectory displayed in the trajectory display section; a trajectorygenerating section configured to generate a trajectory based on datainput through the trajectory input acceptance section; a trajectoryregistering section configured to register data of the trajectorygenerated by the trajectory generating section in the trajectorydatabase; and a trajectory coupling section configured to edit two ormore pieces of trajectory data selected from the trajectory data storedin the trajectory database to become data of one coupled trajectory.